package com.twu.biblioteca.view;

import com.twu.biblioteca.model.users.UserFormatter;
import com.twu.biblioteca.presenter.MembershipPresenter;
import com.twu.biblioteca.view.utils.Output;

/**
 * Created with IntelliJ IDEA.
 * User: cschlumb
 * Date: 08/08/2013
 * Time: 13:42
 * To change this template use File | Settings | File Templates.
 */
public class MembershipView implements MembershipPresenter.Display{

    private final Output output;

    public MembershipView(Output output) {
        this.output = output;
    }

    @Override
    public void prompt(){
        output.write(Messages.PUBLIC_PROMPT);
    }

    @Override
    public void displayDetails(UserFormatter formatter) {
        output.write(formatter.toFormattedString());
    }

    public enum Messages{
        PUBLIC_PROMPT("Please talk to a Librarian. Thank you.");

        private final String message;
        Messages(String message){this.message = message;}
        public String toString() {return message;}
    }

}
